package valeria;

import java.util.Scanner;

public class J03SungJuk {
	
	public static void main(String[]args){
		
				String name;
				int kor;
				int eng;
				int mat;
				int tot;
				double avg;
				char grd = ' ';//학점:수우미양가
				Scanner sc = null; //키보드입력처리
				
				
				sc = new Scanner(System.in);
				System.out.println("이름을 입력하세요");
				name = sc.next(); //이름 입력 받음
				System.out.println("국어점수를 입력하세요");
				kor = sc.nextInt(); //국어입력받음
				System.out.println("수학점수를 입력하세요");
				mat = sc.nextInt(); //수학 입력받음
				System.out.println("영어점수를 입력하세요");
				eng = sc.nextInt();//영어
				
				// 총점,평균,학점 계산
				tot = kor + eng + mat;
				avg = (double)tot / 3; //명시적전환
				switch((int)avg/10){
				case 10:
				case 9:grd='수';break;
				case 8:grd='우';break;
				case 7:grd='미';break;
				case 6:grd='양';break;
				default : grd = '가';
			
				}
				
				//결과출력
			 System.out.println(name);
			 System.out.println(kor);
			 System.out.println(eng);
			 System.out.println(mat);
			 System.out.println(tot);
			 System.out.println(avg);
			 System.out.println(grd);
			 
			sc.close(); //키보드 입력종료
		
		
		
	}

}
